package com.zeratul.common.mybatis.core.page.prop;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ZtPageConfiguration {

    @Configuration
    @ConfigurationProperties(prefix = "zt-plugin.page")
    @Data
    public static class PageConfiguration {
        /**
         * 是否开启分页插件
         */
        boolean enable;

        /**
         * 是否开启分页插件-Web层自动化处理模块
         */
        boolean webHandler;
    }

    @Configuration
    @ConfigurationProperties(prefix = "zt-plugin.page.param")
    @Data
    public static class WebPageParamConfiguration {
        /**
         * 当前页的名称
         */
        String num;
        /**
         * 每页多少条
         */
        String size;
        /**
         * 总页码
         */
        String total;
        /**
         * 总条数
         */
        String count;
    }
}
